<!DOCTYPE html>
<html class="no-js" lang="">

<head>
    #include( "/public-head.html")
</head>

<body >

<div class="main-content" >
    <div class="ott">
        #if($!{focus.terminal}=='3')
        <!--mobile 首页轮播-->
        <div id="carousel-example-generic" class="carousel slide text-center bordered bg-white round overflow-hidden" data-ride="carousel">
            <ol class="carousel-indicators" style="top: 120px;">
                <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
            </ol>
            <div class="carousel-inner " role="listbox">
                <div class="item active" >
                    <div data-toggle="modal" data-target=".bs-modal-sm">
                        <img src="/images/upload_1242x689.jpg" width="248" height="140" class="round" alt="First slide">
                        <div class="title-div"><span><p>2014纽约摩登天空音乐节纪录片</p><p>2015-09-25</p></span><span>观看全部视频</span></div>
                        <input  class="hidden data-json">
                    </div>
                    <button type="button" class="btn btn-danger focus-remove" >删<br/>除</button>
                </div>
            </div>
        </div>
        <!--mobile 首页轮播-->
        #else
        <!--ott 轮播-->
        <div class="tag-main myFocus">
            <ul class="bd" id="" >
                <li data-plth="0">
                    <img src="/images/upload_1242x689.jpg" alt="" width="320" height="180" />
                </li>
            </ul>
            <!--<div class="hd">
                <span></span>
            </div>-->
            <span class="btn-one prev"></span>
            <span class="btn-one next"></span>
        </div>
        <!--ott 轮播-->
        #end
    </div>
    <div class="ott">
        <!--编辑-->
        <div class="cms-data">
            <div class="btn-group cms-nav" data-toggle="buttons">
                <label class="btn btn-default no-margin " data-id="$!{focus.id}" type="1" subscribe="2" terminal="1" >
                    <input type="radio" name="options" id="index">
                    <i class="fa fa-desktop mr5"></i>首页
                </label>
                <label class="btn btn-default active" data-id="$!{focus.id}" type="100" subscribe="2" terminal="1">
                    <input type="radio" name="options" id="live" >
                    <i class="fa fa-desktop mr5"></i>直播
                </label>
                <label class="btn btn-default " data-id="$!{focus.id}" type="2" subscribe="2" terminal="1">
                    <input type="radio" name="options" id="show">
                    <i class="fa fa-desktop mr5"></i>秀场
                </label>
            </div>
            <div class="cms-images">
                <ul id="indexList" class="sortable-list connectedSortable">
                    <li >
                        <div data-toggle="modal" data-target=".bs-modal-sm">
                            <img src="/images/upload_1242x416.jpg" class="add-video" width="320" height="180" >
                            <div class="gory">
                                <div class="exc">独家</div>
                            </div>
                            <input  class="hidden data-json" />
                        </div>
                        <button type="button" class="btn btn-danger focus-remove" >删<br/>除</button>
                    </li>
                </ul>
            </div>
            <div class="btn-div cms-btn">
                <button type="button" class="btn btn-primary add" >添加</button>
                <button type="button" class="btn btn-primary preview" >预览</button>
                <button type="button" class="btn btn-primary save" data-id="indexForm" >保存</button>
            </div>
        </div>

        <!--编辑-->
    </div>

</div>

<!-- /main area -->
<!--modal-->
#parse("/vrs/cms/modal.html")
<!--modal-->
#include( "/public-script.html")
#include( "/sub-script.html")

<script type="text/javascript">
    $('.myFocus').myFocus({
        picHeight:180,            //中间大图 高
        picWidth:320,            //中间大图 宽
        scale:0.8,               //缩小比例
        pitch:45				 //图与图 间隔
    });
    $('.sortable-list').sortable({
        placeholder: 'ui-state-highlight',
        connectWith: '.connectedSortable'
    }).disableSelection();
    //加载轮播数据
    initEditHead('carousel-example-generic','$!{indexHeadFocus.data}');
    $.getJSON("/scripts/cms/category.json",function(data){
        //加载首页列表数据
        //initEditIndexList('indexList','$!{indexListFocus.data}',data);
        //加载直播列表数据
        //initEditIndexList('liveList','$!{liveFocus.data}',data);
        //加载秀场数据
        //initEditIndexList('showList','$!{showFocus.data}',data);
        console.log('$!{focus.data}')
        initEditOttList($('.myFocus'),'$!{focus.data}');
        //initEditPicList("indexList",data);
        $('.cms-data').ott({
            id:'$!{focus.id}',
            focusName:'$!{focus.focusName}',
            type:'$!{focus.type}',
            subscribe:'$!{focus.subscribe}',
            terminal:'$!{focus.terminal}',
            displayOrder:'$!{focus.displayOrder}',
            description:'$!{focus.description}',
            data:'$!{focus.data}'
        },{
            category:data
        })
    })


</script>
<!--sorttable-->

</body>

</html>
<!--
//首页轮播数据
    $.get("/vrs/focus/index.jsn",{type:1,subscribe:0,terminal:3},function(data,textStatus){
        //data     返回的内容，xml,json,html文档
        //textStatus     请求状态：success/error/notmodified/timeout
        if(textStatus == "success"){
            var success = data.success;
            if(success){
//                initEditHead('carousel-example-generic',data.data.data);
            }
        }
    },"json");
//首页列表数据
        $.get("/vrs/focus/index.jsn",{type:1,subscribe:2,terminal:3},function(data,textStatus){
            //data     返回的内容，xml,json,html文档
            //textStatus     请求状态：success/error/notmodified/timeout
            if(textStatus == "success"){
                var success = data.success;
                if(success){
//                    initEditIndexList('indexList',data.data.data,data);
                }
            }
        },"json");
        //直播数据
        $.get("/vrs/focus/index.jsn",{type:100,subscribe:2,terminal:3},function(data,textStatus){
            //data     返回的内容，xml,json,html文档
            //textStatus     请求状态：success/error/notmodified/timeout
            if(textStatus == "success"){
                var success = data.success;
                if(success){
//                    initEditIndexList('liveList',data.data.data,data);
                }
            }
        },"json");
        //秀场数据
        $.get("/vrs/focus/index.jsn",{type:2,subscribe:2,terminal:3},function(data,textStatus){
            //data     返回的内容，xml,json,html文档
            //textStatus     请求状态：success/error/notmodified/timeout
            if(textStatus == "success"){
                var success = data.success;
                if(success){
//                    initEditIndexList('showList',data.data.data,data);
                }
            }
        },"json");

-->